package cn.wuxing.mediation.businessplatform.domain.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @description: <描述>
 * @date: 2024/9/16 11:21
 * @author: yang
 * @version: 1.0
 */
@Getter
@AllArgsConstructor
public enum OrdinaryDisputeEventTypeEnum {

    // 1.邻里纠纷 2.家庭婚姻纠纷 3.保险合同纠纷 4.生产经营纠纷 5.按照纠纷类型配置显示
    NEIGHBORHOOD_DISPUTE("1", "邻里纠纷"),

    FAMILY_MARRIAGE_DISPUTE("2", "家庭婚姻纠纷"),

    CONTRACT_DISPUTE("3", "保险合同纠纷"),

    BUSINESS_PRODUCTION_DISPUTE("4", "生产经营纠纷"),

    CONFIGURE_DISPUTE("5", "按照纠纷类型配置显示")
    ;

    private final String code;

    private final String desc;

    public static String getDescByCode(String code) {
        for (OrdinaryDisputeEventTypeEnum item : OrdinaryDisputeEventTypeEnum.values()) {
            if (item.getCode().equals(code)) {
                return item.getDesc();
            }
        }
        return null;
    }
}
